import java.io.FileOutputStream;
import java.util.Map;
import java.util.Properties;

public class SystemTest {
    public static void main(String[] args)
        throws Exception
    {
        Map<String, String> env = System.getenv();
        for(String name : env.keySet())
        {
            System.out.println(name + "--->"+ env.get(name));
        }
        System.out.println(System.getenv("TMP"));
        Properties props = System.getProperties();
        props.store(new FileOutputStream("props.txt")
        , "system properties");
        System.out.println(System.getProperty("os.name"));

        System.out.println(System.currentTimeMillis());
        System.out.println(System.nanoTime());
        String s1 = new String("hello");
        String s2 = new String("hello");
        String s3 = "hello";
        String s4 = "hello";
        System.out.println(s1.equals(s2));
        System.out.println(s3.hashCode()==s4.hashCode());
    }
}
